package com.xmkj.jijidriver.mine.activity;

import android.os.Handler;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.common.mvp.BaseMvpActivity;
import com.common.mvp.BasePresenter;
import com.xmkj.jijidriver.R;
import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by chen on 2018/4/2.
 */

public class SettingActivity extends BaseMvpActivity {
    @BindView(R.id.rl_aboat_us)
    RelativeLayout mRlAboatUs;
    @BindView(R.id.rl_clear)
    RelativeLayout mRlClear;
    @BindView(R.id.rl_device)
    RelativeLayout mRlDevice;
    @BindView(R.id.rl_kefu)
    RelativeLayout mRlKefu;
    @BindView(R.id.tv_logout)
    TextView mTvLogout;
    private Handler handler = new Handler();

    @Override
    protected BasePresenter createPresenterInstance() {
        return null;
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_setting;
    }

    @Override
    protected void onViewCreated() {

    }

    @Override
    protected void doLogicFunc() {
        attachClickListener(mRlClear);
        attachClickListener(mRlDevice);
    }

    @Override
    protected void onViewClicked(View view) {
        if (view.getId() == mRlClear.getId()) {
            showProgressingDialog();
            handler.postDelayed(new Runnable() {
                @Override
                public void run() {
                            dismissProgressDialog();      
                            showToastMsg("清理完毕！");
                }
            }, 2000);
        }else if(view.getId()==mRlDevice.getId()){
            gotoActivity(DeviceActivity.class);
        }
    }

    @Override
    protected void setNavigation() {
        setNavigationBack("系统设置");
    }


    @Override
    public void bindKnife() {
        ButterKnife.bind(this);
    }
}
